<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>个人信息</title>
    <link href="favicon.ico" ref="short icon">
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>
<body>
<div id="app" v-cloak>
    <el-descriptions title="用户信息">
        <el-descriptions-item label="用户名">{{user}}</el-descriptions-item>
    </el-descriptions>
</div>
<script src="https://unpkg.com/vue@2/dist/vue.js"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="https://cdn.staticfile.org/vue-resource/1.5.1/vue-resource.min.js"></script>
<script>
    new Vue({
        el: '#app',
        data() {
            return {
                user: ""
            }
        },
        created() {
            this.$http.post('/scf/api/get/user').then(res => {
                console.info("res", JSON.stringify(res))
                if (res.status == '200') {
                    if(res.body){
                        this.user = res.body
                    }
                    if(res.bodyText){
                        this.user = res.bodyText
                    }

                } else {
                    this.$message({
                        type: 'error',
                        message: res.statusText
                    });
                }
            }).catch(res => {
                console.error(res)
            })
        },
        methods: {
        }
    })
</script>
</body>
</html>